package com.lxy;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ConfigReader {
    public static String getChromeDriverPath() {
        Properties properties = new Properties();
        try (InputStream input = ConfigReader.class.getClassLoader()
                .getResourceAsStream("application.properties")) {

            properties.load(input);
            return properties.getProperty("webdriver.chrome.driver.path");

        } catch (IOException e) {
            throw new RuntimeException("无法读取配置文件", e);
        }
    }
}
